package com.example.sls.service.impl.teacher;

import com.example.sls.mapper.teacher.EmpDtViewMapper;
import com.example.sls.pojo.teacher.EmpDtView;
import com.example.sls.service.teacher.EmpDtViewService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpDtViewServiceImpl implements EmpDtViewService {
    @Autowired
    private EmpDtViewMapper empDtViewMapper;
    @Override
    public PageInfo<EmpDtView> getAllDataByPage(Integer pageNum, Integer pageSize) {

        PageHelper.startPage(pageNum, pageSize);
        List<EmpDtView> empDtViews = empDtViewMapper.getAllData();
        return new PageInfo<EmpDtView>(empDtViews);
    }
}
